package com.himilco.ocana.workflow.core.dao;
 
//import javax.jms.Connection;
//import javax.jms.ConnectionFactory;
//import javax.jms.JMSException;
//import javax.jms.MessageProducer;
//import javax.jms.ObjectMessage;
//import javax.jms.Queue;
//import javax.jms.QueueSession;
//import javax.jms.Session;

//import org.hornetq.api.core.TransportConfiguration;
//import org.hornetq.api.jms.HornetQJMSClient;
//import org.hornetq.api.jms.JMSFactoryType;
//import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory; 
 

import com.himilco.ocana.workflow.core.dao.entities.MyMessage;
 
public class AgentListenerClient {
 
//    public static void main(String[] args) {
//        TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName()); 
//        ConnectionFactory factory = (ConnectionFactory)HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF,transportConfiguration);
//        Queue queue = HornetQJMSClient.createQueue("testQueue");
//        Connection connection; 
//        try {
//            connection = factory.createConnection();
//            Session session = connection.createSession(false,QueueSession.AUTO_ACKNOWLEDGE);
//            MessageProducer producer = session.createProducer(queue);
//            ObjectMessage objMsg = session.createObjectMessage();
//            MyMessage myMsg = new MyMessage();
//            myMsg.setContent("THIS IS TESTING MSG FOR MDB OCANA");
//            myMsg.setIdMessage("0");
//            objMsg.setObject(myMsg); 
//            producer.send(objMsg);
//            System.out.println("Sending Msg....");
// 
//            session.close();
//        } catch (JMSException e) {
//            e.printStackTrace();
//        }
//    }
}